package API.DAY4.file;

import java.io.File;

public class ListFliesDemo {
    public static void main(String[] args) {
        File file = new File(".");
        if(file.isDirectory()){
            System.out.println("是一个目录");
            File[] subs = file.listFiles();
            for(File sub:subs){
                System.out.println(sub.getName());
            }
        }else {
            System.out.println("不是一个目录");
        }
    }
}
